Merged
Conversation
Deploying datachain with
|
| Latest commit: |
5a8a102
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://a1409504.datachain-2g6.pages.dev |
| Branch Preview URL: | https://ilongin-1536-local-db-migrat.datachain-2g6.pages.dev |
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
shcheklein
reviewed
Jan 5, 2026
pyproject.toml
Outdated
| "ignore::DeprecationWarning:datasets.utils._dill", | ||
| "ignore::DeprecationWarning:librosa.core.intervals", | ||
| "ignore::FutureWarning:google.api_core._python_version_support", # Python 3.10 EOL warning | ||
| "ignore:The default formatters.*will be replaced by ruff:FutureWarning:datamodel_code_generator.*", # Formatter migration warning |
Contributor
There was a problem hiding this comment.
let's not do this please, properly fix this
shcheklein
reviewed
Jan 5, 2026
shcheklein
reviewed
Jan 6, 2026
pyproject.toml
Outdated
| "pydantic", | ||
| "jmespath>=1.0", | ||
| "datamodel-code-generator>=0.25", | ||
| "datamodel-code-generator>=0.27", |
Contributor
There was a problem hiding this comment.
let's do these changes and Pillow as a separate PR
shcheklein
approved these changes
Jan 7, 2026
dreadatour
reviewed
Jan 8, 2026
| parts.append(f"DEFAULT {default_val}") | ||
|
|
||
| column_def = " ".join(parts) | ||
| alter_query = f"ALTER TABLE {table_name} ADD COLUMN {column_def}" |
Contributor
There was a problem hiding this comment.
I think we can use sqlalchemy here and not build raw SQL, which is fragile/not safe.
Brief example:
from sqlalchemy.schema import AddColumn
table.append_column(col)
self.execute(AddColumn(table, col))Haven't checked it but it looks more robust to me, what do you think?
Contributor
Author
There was a problem hiding this comment.
There is no AddColumn any more, SQLAlchemy stopped supporting it a while ago since it wasn't stable / portable I guess. Only thing left is to create raw query.
…in-ai/datachain into ilongin/1536-local-db-migrations
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Simple DB automatic migration for SQLite to add new columns to existing DB.
Note that this code doesn't cover:
Migration runs on every SQLite DB initialization but it is fast enough not to create overhead (there is a test added that measures performance)